function router(handle, pathname, response, postData){
    if(typeof handle[pathname] == 'function'){
        return handle[pathname](response);
    } else {
        // console.log("No request handler found for " + pathname);
        const content =  "404 the page not found";
        response.writeHead(404, {'Content-Type':'text/plain'});
        response.write(content);
        response.end();
    }
}

exports.router = router;